const appId="wxb29a835e584dde36";
const appSecret="e816cfba7d23b3ba7fea6c0529bbe911";

const jwt=require("jsonwebtoken");

function getToken(openid){
	return jwt.sign({openid:openid},appSecret,{expiresIn:60*60*24});
}

function verifyToken(token){
	return jwt.verify(token,appSecret);
}


module.exports ={
	appId:appId,
	appSecret:appSecret,
	getToken:getToken,
	verifyToken:verifyToken
}
